%.o:%.c
	gcc -m32 -O2 -std=c99 -ffreestanding -fno-builtin -nostdlib -c $< -o $@
%.o:%.cpp
	g++ -m32 -O2 -std=c++14 -ffreestanding -fno-builtin -nostdlib -c $< -o $@
%.bin:%.o
	ld -m elf_i386 $< -o $@
%.bin:%.asm
	nasm $< -o $@
final.tmp:$(wildcard $(dir)/*.bin)
	cat $(wildcard $(dir)/*.bin) > final.tmp

OS.img:final.tmp
	dd if=final.tmp of=OS.img bs=1 count=1474560



by_python:
	python tools/build.py